#!/bin/sh
#根据进程名杀死进程
if [ $# -lt 1 ]
then
  #export pname="autoUpdateWallpaperMain.sh"
  echo "杀进程 <进程名>"
  exit 1
else
  export pname="$1"
  PROCESS=`ps -ef|grep $pname|grep -v grep|grep -v PPID|awk '{ print $2}'`
  for i in $PROCESS
  do
    echo "Kill the $pname process [ $i ]"
    kill -9 $i
  done
fi
